﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SchoolSet
{
    class SchoolClass : ICommentable
    {
        private string className;
        private List<string> comments;
        private List<Teacher> teachers;
        private List<Student> students;

        public string ClassName
        {
            get { return this.className; }
        }

        public string[] Comments
        {
            get
            {
                return this.comments.ToArray();
            }
        }
        public Student[] Students
        {
            get
            {
                return this.students.ToArray();
            }
        }

        public Teacher[] Teachers
        {
            get
            {
                return this.teachers.ToArray();
            }
        }

        public void AddComment(string comment)
        {
            this.comments.Add(comment);
        }

        public SchoolClass(string className)
        {
            this.className = className;
        }

        public SchoolClass(string className,Student[] students, Teacher[] teachers)
    {
        this.students = new List<Student>(students);
        this.teachers = new List<Teacher>(teachers);
        this.className = className;
        this.comments = new List<string>();
    }

        public void AddStudent(Student student)
        {
            this.students.Add(student);
        }

        public void RemoveStudent(Student student)
        {
            this.students.Remove(student);
        }

        public void AddTeacher(Teacher teacher)
        {
            this.teachers.Add(teacher);
        }
        public void RemoveTeacher(Teacher teacher)
        {
            this.teachers.Remove(teacher);
        }
    }
}
